<template>
 <header>
   <nav class="navbar navbar-default navbar-fixed-top">
     <div class="container">
       <ul class="nav navbar-nav" style="float: right">
         <li class="active">
           <a  v-on:click.prevent="photoSort('time')" href="#">时间轴<span class="sr-only">(current)</span></a>
         </li>
         <li><a v-on:click.prevent="alertInfo()" href="#">相册</a></li>
         <li><a v-on:click.prevent="photoSort('like')" href="#">最佳</a></li>
         <li><a v-on:click.prevent="toUserInfo()" href="#">用户中心</a></li>
       </ul>
     </div>
   </nav>
 </header>
</template>

<script>
  export default {
    name : 'header-self',
    data() {
      return {

      }
    },
    methods: {
      photoSort(type) {
        this.$store.dispatch('setPhotoSort', type);
      },
      toUserInfo() {
        this.$router.push('user');
      },
      alertInfo() {
        alert('功能暂未开放');
      }
    }
  }
</script>
<style>
  .navbar, header {
    background-color: #D1E0E9;
    flex: 0 0 4.875rem;
  }
</style>
